<!doctype html>
<html xmlns:wb="http://open.weibo.com/wb">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" >
<meta name="renderer" content="webkit">
<title>
<?php
if (is_home())
	echo bloginfo('name'), ' - ',   bloginfo('description');
elseif (is_category()) 
	echo single_cat_title(), ' | ',   bloginfo('name'), ' - ',   bloginfo('description');
elseif (is_single() || is_page()) 
	echo single_post_title(), ' | ',   bloginfo('name'), ' - ',   bloginfo('description');
elseif (is_search()) 
	echo '搜索结果 | ',   bloginfo('name'), ' - ',   bloginfo('description');
elseif (is_404()) 
	echo '页面未找到! | ',   bloginfo('name'), ' - ',   bloginfo('description');
else 
	wp_title('', true);
?>
</title>
<meta name="robots" content="all">
<meta name="keywords" content="<?php echo new_option('header_keywords','New一个,代码,分享'); ?>">
<meta name="description" content="<?php echo new_option('header_description','New一个,代码分享'); ?>">
<link rel="shortcut icon" href="<?php echo new_option('favicon_ico', '' . get_template_directory_uri() . '/images/icons/favicon.ico'); ?>"/>
<link rel="bookmark" href="<?php echo new_option('favicon_ico', '' . get_template_directory_uri() . '/images/icons/favicon.ico'); ?>" type="image/x-icon"/>
<?php wp_head(); ?>
<script type="text/javascript">
jQuery(".header .loading span").animate({
	width: "70%"
});
</script>
</head>
<body <?php body_class(); ?>>
<div class="header">
  <div class="loading">
    <span></span>
  </div>
  <div class="navbar ma">
    <div class="nav_left fl">
      <div class="logo fl">
        <a href="<?php bloginfo('url'); ?>"> <img src="<?php echo new_option('header_logo',''.get_template_directory_uri().'/images/logo.png'); ?>" alt="<?php bloginfo(); ?>"/> </a>
      </div>
      <?php navbar_menu(); ?>
    </div>
    <div class="nav_right fr">
      <?php get_search_form(); ?>
      <div class="userinfo fr">
        <?php if(is_user_logged_in()) {
        	global $wp;
			$current_user = wp_get_current_user();
			$user_ID = $current_user->ID;
		?>
        <div class="menu fl">
          <ul class="menu_ul">
            <li class="menu_li">
              <div class="menu_user">
                <?php echo get_avatar($user_ID,'30'); ?> <a class="es" title="<?php $current_user->display_name; ?>" href="<?php echo get_author_posts_url( $user_ID ); ?>"><?php echo $current_user->display_name; ?><b></b></a>
              </div>
              <ul class="menu_ul_ul">
                <li class="menu_li_li"><a href="<?php echo wp_logout_url(get_permalink()); ?>">修改资料</a></li>
                <li class="menu_li_li"><a href="<?php echo wp_logout_url(home_url(add_query_arg(array()))); ?>">退出</a></li>
              </ul>
            </li>
          </ul>
        </div>
        <?php } else {?>
        <a class="login" href="<?php echo login_url('qq'); ?>">QQ快捷登录</a>
        <?php }?>
      </div>
    </div>
  </div>
</div>
<div class="main ma">
<?php breadcrumbs(); ?>
